import 'dart:math';

import 'package:expandable_text/expandable_text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:gourmet/ui/sliver_header.dart';
import 'package:gourmet/ui/sliver_persistent_container.dart';
import 'package:gourmet/utils/colors.dart';
import 'package:gourmet/utils/radian.dart';
import 'package:gourmet/utils/styles.dart';
import 'package:gourmet/utils/svg.dart';
import 'package:gourmet/utils/tools.dart';
import 'package:sticky_headers/sticky_headers/widget.dart';

class StoreMainController extends GetxController
    with GetTickerProviderStateMixin {
  late TabController controller;

  RxInt tabIndex = RxInt(0);

  RxBool overlaps = RxBool(false);

  late List<Tab> tabs;

  late ScrollController scrollController;

  RxDouble opacity = RxDouble(0);

  final double tabHeight = 45.0;

  List<String> tags = ['全部 405', '最新', '好评价 345', '差评 26', '有图 14', '商家回复'];

  RxInt tagIndex = RxInt(0);

  @override
  void onInit() {
    tabs = [
      Tab(
        child: Text.rich(
          TextSpan(
            children: [
              const TextSpan(text: '点餐'),
              WidgetSpan(
                  child: Obx(
                    () => Visibility(
                      visible: overlaps.value,
                      child: GestureDetector(
                        onTap: () {
                          scrollController.animateTo(0,
                              duration: const Duration(milliseconds: 200),
                              curve: Curves.linear);
                        },
                        child: Icon(
                          CupertinoIcons.arrow_up_circle_fill,
                          color: ColorsUtils.parseColorFromHexString(
                              ColorsUtils.color9999),
                          size: 18,
                        ),
                      ),
                    ),
                  ),
                  alignment: PlaceholderAlignment.top),
            ],
          ),
        ),
      ),
      Tab(
        child: Text.rich(
          TextSpan(
            children: [
              const TextSpan(
                text: '评价',
              ),
              TextSpan(
                text: '4.5',
                style: StylesUtils.customTextStyle(
                    color: ColorsUtils.color9999,
                    fontSize: StylesUtils.fontSize12),
              ),
            ],
          ),
        ),
      ),
      const Tab(
        text: '商家',
      ),
    ];
    controller = TabController(
        length: tabs.length, vsync: this, initialIndex: tabIndex.value);
    controller.animation?.addListener(() {
      tabIndex.value = controller.index;
    });
    scrollController = ScrollController()
      ..addListener(() {
        opacity.value = (scrollController.offset / 100.0).clamp(0, 1);
      });
    super.onInit();
  }

  @override
  void onClose() {
    scrollController.dispose();
    controller.dispose();
    super.onClose();
  }
}

class StoreMainPage extends GetView<StoreMainController> {
  const StoreMainPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: ColorsUtils.rgba(247, 247, 247, 1),
      body: Stack(
        children: [
          buildNestedScroll(context),
          Obx(
            () => Visibility(
              visible: controller.tabIndex.value == 0,
              child: Positioned(
                width: 345,
                height: 50,
                left: (Get.width - 345) / 2,
                bottom: 10,
                child: Container(
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.circular(25),
                    color: ColorsUtils.parseColorFromHexString(
                        ColorsUtils.color3333),
                  ),
                  padding: const EdgeInsets.symmetric(horizontal: 10),
                  child: Row(
                    children: [
                      SizedBox(
                        width: 40,
                        child: Stack(
                          clipBehavior: Clip.none,
                          children: [
                            Column(
                              children: [
                                Container(
                                  margin: const EdgeInsets.only(top: 3),
                                  alignment: Alignment.center,
                                  child: SvgUtils.assetName('u2333',
                                      width: 25, height: 17),
                                ),
                                Center(
                                  child: SvgUtils.assetName('u2332',
                                      width: 40, height: 25),
                                ),
                              ],
                            ),
                            Positioned(
                              top: (50 - 20) / 2,
                              right: -5,
                              width: 15,
                              height: 15,
                              child: Container(
                                constraints: const BoxConstraints.expand(
                                    width: 15, height: 15),
                                alignment: Alignment.center,
                                decoration: BoxDecoration(
                                  color: Colors.white,
                                  borderRadius: BorderRadius.circular(7.5),
                                ),
                                child: Text(
                                  '1',
                                  style: StylesUtils.customTextStyle(
                                      fontSize: StylesUtils.fontSize11,
                                      color: ColorsUtils.colorFf64),
                                ),
                              ),
                            ),
                          ],
                        ),
                      ),
                      Expanded(
                        child: Padding(
                          padding: const EdgeInsets.only(left: 10),
                          child: Column(
                            children: [
                              Container(
                                alignment: Alignment.centerLeft,
                                margin:
                                    const EdgeInsets.only(top: 5, bottom: 5),
                                child: Text.rich(
                                  TextSpan(
                                    children: [
                                      TextSpan(
                                        text: '￥18 ',
                                        style: StylesUtils.customTextStyle(
                                            fontSize: StylesUtils.fontSize18,
                                            fontWeight: FontWeight.w700),
                                      ),
                                      TextSpan(
                                        text: '￥20',
                                        style: StylesUtils.customTextStyle(
                                            color: ColorsUtils.color9999,
                                            fontSize: StylesUtils.fontSize12,
                                            decorationColor: ColorsUtils
                                                .parseColorFromHexString(
                                                    ColorsUtils.color9999),
                                            decorationStyle:
                                                TextDecorationStyle.solid,
                                            decorationThickness: 1,
                                            decoration:
                                                TextDecoration.lineThrough),
                                      ),
                                    ],
                                  ),
                                ),
                              ),
                              Container(
                                alignment: Alignment.centerLeft,
                                child: Text(
                                  '另需配送费￥4',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorF2f2,
                                      fontSize: StylesUtils.fontSize12),
                                ),
                              ),
                            ],
                          ),
                        ),
                      ),
                      Center(
                        child: Text(
                          '差2元起送',
                          style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color9999,
                              fontSize: StylesUtils.fontSize13),
                        ),
                      ),
                    ],
                  ),
                ),
              ),
            ),
          ),
        ],
      ),
    );
  }

  Color get opacityColor {
    return controller.opacity.value == 0
        ? Colors.white
        : Colors.black.withOpacity(controller.opacity.value);
  }

  Widget get titleWidget {
    if (controller.opacity.value > 0.45) {
      return TextField(
        cursorHeight: 20,
        cursorWidth: 3,
        cursorRadius: const Radius.circular(2),
        cursorColor: Colors.blue,
        decoration: InputDecoration(
          fillColor: Colors.white,
          hintText: '请输入商品名称',
          hintStyle: StylesUtils.customTextStyle(color: ColorsUtils.color9999),
          isCollapsed: true,
          filled: true,
          isDense: true,
          prefixIcon: Icon(
            Icons.search,
            color: ColorsUtils.parseColorFromHexString(ColorsUtils.color9999),
            size: 20.w,
          ),
          contentPadding: const EdgeInsets.symmetric(vertical: 10),
          enabledBorder: OutlineInputBorder(
            borderRadius: BorderRadius.circular(17.5),
            borderSide: BorderSide.none,
          ),
          focusedBorder: OutlineInputBorder(
            borderRadius: BorderRadius.circular(17.5),
            borderSide: BorderSide.none,
          ),
          border: OutlineInputBorder(
            borderRadius: BorderRadius.circular(17.5),
            borderSide: BorderSide.none,
          ),
          constraints: const BoxConstraints.expand(width: 235, height: 35),
        ),
      );
    }
    return Container();
  }

  NestedScrollView buildNestedScroll(BuildContext context) {
    return NestedScrollView(
      controller: controller.scrollController,
      headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) {
        return [
          SliverAppBar(
            backgroundColor: Colors.white,
            leading: Obx(() => IconButton(
                onPressed: Get.back,
                icon:
                    Icon(Icons.arrow_back_ios, size: 18, color: opacityColor))),
            actions: [
              Obx(
                () => Visibility(
                  visible: !(controller.opacity.value > 0),
                  child: IconButton(
                      onPressed: () {},
                      icon: const Icon(
                        CupertinoIcons.search,
                        size: 18,
                        color: Colors.white,
                      )),
                ),
              ),
              Obx(
                () => IconButton(
                  onPressed: () {},
                  icon: Icon(
                    CupertinoIcons.suit_heart,
                    size: 18,
                    color: opacityColor,
                  ),
                ),
              ),
              Obx(
                () => IconButton(
                  onPressed: () {},
                  icon: Icon(
                    CupertinoIcons.ellipsis,
                    size: 18,
                    color: opacityColor,
                  ),
                ),
              ),
            ],
            pinned: true,
            expandedHeight: 170,
            flexibleSpace: FlexibleSpaceBar(
              background: Stack(
                children: [
                  Image.network(
                    'https://cdn7.axureshop.com/demo2024/1877666/images/%E5%BA%97%E9%93%BA%E4%B8%BB%E9%A1%B5_%E7%82%B9%E9%A4%90/u2185.jpg',
                    width: Get.width,
                    height: 120,
                    fit: BoxFit.fill,
                  ),
                  Positioned(
                    bottom: 0,
                    right: 0,
                    left: 0,
                    child: Container(
                      padding: const EdgeInsets.only(
                          left: 15, top: 15, right: 15, bottom: 15),
                      decoration: const BoxDecoration(
                          color: Colors.white,
                          borderRadius: BorderRadius.only(
                              topLeft: Radius.circular(15),
                              topRight: Radius.circular(15))),
                      child: Column(
                        children: [
                          Container(
                            alignment: Alignment.centerLeft,
                            child: Text(
                              '华莱士·全鸡汉堡-凤凰广',
                              style: StylesUtils.customTextStyle(
                                  color: ColorsUtils.color0000,
                                  fontWeight: FontWeight.w700,
                                  fontSize: StylesUtils.fontSize20),
                            ),
                          ),
                          Container(
                            margin: const EdgeInsets.only(top: 10),
                            alignment: Alignment.centerLeft,
                            child: Wrap(
                              spacing: 10,
                              children: [
                                Text(
                                  '平台专送',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorFf64,
                                      fontSize: StylesUtils.fontSize11),
                                ),
                                Text(
                                  '30分钟  月售312  人均￥45  可自取 ',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color0000,
                                      fontSize: StylesUtils.fontSize12),
                                ),
                              ],
                            ),
                          ),
                          Container(
                            margin: const EdgeInsets.only(top: 10),
                            alignment: Alignment.centerLeft,
                            child: Wrap(
                              spacing: 15,
                              children: [
                                Material(
                                  color: ColorsUtils.parseColorFromHexString(
                                      ColorsUtils.colorFf64),
                                  shape: _CouponShapeBorder(),
                                  child: SizedBox(
                                    width: 70,
                                    height: 20,
                                    child: Row(
                                      children: [
                                        Expanded(
                                          flex: 40,
                                          child: Center(
                                            child: Text(
                                              '￥3',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                      fontWeight:
                                                          FontWeight.w700),
                                            ),
                                          ),
                                        ),
                                        Expanded(
                                          flex: 30,
                                          child: Center(
                                            child: Text(
                                              '领',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                      fontSize: StylesUtils
                                                          .fontSize12),
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ),
                                Material(
                                  // borderRadius: BorderRadius.circular(2),
                                  color: ColorsUtils.rgba(250, 245, 245),
                                  shape: _CouponShapeBorder2(),
                                  child: SizedBox(
                                    width: 70,
                                    height: 20,
                                    child: Row(
                                      children: [
                                        Expanded(
                                          flex: 35,
                                          child: Center(
                                            child: Text(
                                              '￥5',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                      color:
                                                          ColorsUtils.colorFf64,
                                                      fontWeight:
                                                          FontWeight.w700),
                                            ),
                                          ),
                                        ),
                                        Expanded(
                                          flex: 35,
                                          child: Center(
                                            child: Text(
                                              '已领',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                      color:
                                                          ColorsUtils.colorFf64,
                                                      fontSize: StylesUtils
                                                          .fontSize12),
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                ),
                              ],
                            ),
                          )
                        ],
                      ),
                    ),
                  ),
                  Positioned(
                    top: 80,
                    right: 15,
                    bottom: 0,
                    child: ClipRRect(
                      borderRadius: BorderRadius.circular(5),
                      child: Image.network(
                        'https://img0.baidu.com/it/u=655977884,3582260165&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
                        width: 65,
                        height: 65,
                      ),
                    ),
                  ),
                ],
              ),
            ),
            forceElevated: innerBoxIsScrolled,
            systemOverlayStyle: SystemUiOverlayStyle.dark,
            title: Obx(() => titleWidget),
          ),
          SliverToBoxAdapter(
            child: Container(
              color: Colors.white,
              padding: const EdgeInsets.only(left: 15, right: 15, bottom: 20),
              alignment: Alignment.centerLeft,
              child: ExpandableText(
                '公告：华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，华莱士全鸡汉堡，全国门店一万家。全鸡配汉堡，',
                style: StylesUtils.customTextStyle(
                    fontSize: StylesUtils.fontSize13,
                    color: ColorsUtils.color9999,
                    lineHeight: 1.5),
                expandText: '展开',
                collapseText: '收起',
                maxLines: 1,
              ),
            ),
          ),
          SliverPersistentHeader(
            delegate: SliverHeaderDelegate.builder(
                maxHeight: controller.tabHeight,
                minHeight: controller.tabHeight,
                builder: (BuildContext context, double shrinkOffset,
                    bool overlapsContent) {
                  Get.log('overlapsContent = $overlapsContent');
                  Get.engine.addPostFrameCallback((_) {
                    controller.overlaps.value = overlapsContent;
                    Get.log('overlaps = ${controller.overlaps.value}');
                  });
                  return Container(
                    height: controller.tabHeight,
                    color: Colors.white,
                    padding:
                        const EdgeInsets.only(left: 15, right: 15, bottom: 8),
                    alignment: Alignment.centerLeft,
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Expanded(
                          child: ToolsUtils.getClientTabBar(
                              [], controller.controller,
                              tabList: controller.tabs,
                              isScrollable: false,
                              labelColor: ColorsUtils.colorFf64,
                              unselectedLabelColor: ColorsUtils.color0000,
                              labelStyle: StylesUtils.customTextStyle(
                                  color: ColorsUtils.colorFf64,
                                  fontSize: StylesUtils.fontSize16,
                                  fontWeight: FontWeight.w700),
                              unselectedLabelStyle: StylesUtils.customTextStyle(
                                color: ColorsUtils.color0000,
                                fontSize: StylesUtils.fontSize16,
                              ),
                              indicatorColor: ColorsUtils.colorFf64),
                        ),
                        TextButton(
                          onPressed: () {},
                          style: ButtonStyle(
                              fixedSize:
                                  const WidgetStatePropertyAll(Size(80, 25)),
                              minimumSize:
                                  const WidgetStatePropertyAll(Size(80, 25)),
                              shape: WidgetStatePropertyAll(
                                RoundedRectangleBorder(
                                  borderRadius: BorderRadius.circular(13),
                                  side: BorderSide(
                                    color: ColorsUtils.parseColorFromHexString(
                                        ColorsUtils.colorFf64),
                                  ),
                                ),
                              ),
                              padding:
                                  const WidgetStatePropertyAll(EdgeInsets.zero),
                              overlayColor: const WidgetStatePropertyAll(
                                  Colors.transparent),
                              alignment: Alignment.center),
                          child: Text(
                            '团购优惠',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.colorFf64,
                                fontSize: StylesUtils.fontSize12),
                          ),
                        ),
                      ],
                    ),
                  );
                }),
            pinned: true,
          )
        ];
      },
      body: TabBarView(
        controller: controller.controller,
        children: [
          CustomScrollView(
            slivers: [
              SliverToBoxAdapter(
                child: Container(
                  padding: const EdgeInsets.only(top: 10, bottom: 10),
                  alignment: Alignment.center,
                  child: ClipRRect(
                    borderRadius: BorderRadius.circular(5),
                    child: Image.network(
                      'https://img2.baidu.com/it/u=3283664953,2924104855&fm=253&fmt=auto&app=138&f=PNG?w=500&h=213',
                      width: 345,
                      height: 90,
                      fit: BoxFit.fill,
                    ),
                  ),
                ),
              ),
              SliverLayoutBuilder(builder: (_, SliverConstraints box) {
                double max = Get.height - controller.tabHeight - kToolbarHeight;
                double min = box.precedingScrollExtent;
                return SliverPersistentContainer(
                  maxExtent: max,
                  minExtent: min,
                  child: Row(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    mainAxisAlignment: MainAxisAlignment.start,
                    children: [
                      Container(
                        width: 90,
                        constraints: BoxConstraints(
                            maxWidth: 90,
                            minWidth: 90,
                            minHeight: min,
                            maxHeight: max),
                        color: ColorsUtils.parseColorFromHexString(
                            ColorsUtils.colorF9f9),
                        child: ListView(
                          children: [
                            StickyHeader(
                              header: Container(),
                              content: Column(
                                children: [
                                  Container(
                                    height: 50,
                                    alignment: Alignment.center,
                                    color: Colors.white,
                                    child: Stack(
                                      children: [
                                        Center(
                                          child: Text(
                                            '招牌热销',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.colorFf64,
                                                fontSize:
                                                    StylesUtils.fontSize13),
                                          ),
                                        ),
                                        Positioned(
                                          top: 8,
                                          right: 8,
                                          child: CircleAvatar(
                                            backgroundColor: ColorsUtils
                                                .parseColorFromHexString(
                                                    ColorsUtils.colorFf64),
                                            radius: 7.5,
                                            child: Text(
                                              '1',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                      fontSize: StylesUtils
                                                          .fontSize11),
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  Container(
                                    height: 50,
                                    alignment: Alignment.center,
                                    child: Text(
                                      '汉堡套餐',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color7979,
                                          fontSize: StylesUtils.fontSize13),
                                    ),
                                  ),
                                  Container(
                                    height: 50,
                                    alignment: Alignment.center,
                                    child: Text(
                                      '多人套餐',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color7979,
                                          fontSize: StylesUtils.fontSize13),
                                    ),
                                  ),
                                  Container(
                                    height: 50,
                                    alignment: Alignment.center,
                                    child: Text(
                                      '小吃套餐',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color7979,
                                          fontSize: StylesUtils.fontSize13),
                                    ),
                                  ),
                                  Container(
                                    height: 50,
                                    alignment: Alignment.center,
                                    child: Text(
                                      '全鸡套餐',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color7979,
                                          fontSize: StylesUtils.fontSize13),
                                    ),
                                  ),
                                  Container(
                                    height: 50,
                                    alignment: Alignment.center,
                                    child: Text(
                                      '折扣单品',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color7979,
                                          fontSize: StylesUtils.fontSize13),
                                    ),
                                  ),
                                ],
                              ),
                            )
                          ],
                        ),
                      ),
                      Expanded(
                        child: Container(
                          color: Colors.white,
                          child: SingleChildScrollView(
                            padding: const EdgeInsets.only(left: 15),
                            child: StickyHeader(
                              header: Container(),
                              content: Column(
                                children: [
                                  Container(
                                    height: 50,
                                    alignment: Alignment.centerLeft,
                                    child: Text(
                                      '招牌热销',
                                      style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color0000,
                                      ),
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(bottom: 10),
                                    child: Row(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      mainAxisAlignment:
                                          MainAxisAlignment.start,
                                      children: [
                                        Stack(
                                          children: [
                                            Container(
                                              constraints:
                                                  const BoxConstraints.expand(
                                                      width: 100, height: 100),
                                              decoration: BoxDecoration(
                                                borderRadius:
                                                    BorderRadius.circular(5),
                                                image: const DecorationImage(
                                                  image: NetworkImage(
                                                    'https://img0.baidu.com/it/u=2807318534,3734623072&fm=253&fmt=auto&app=120&f=JPEG?w=973&h=644',
                                                  ),
                                                  fit: BoxFit.fill,
                                                ),
                                              ),
                                            ),
                                            Positioned(
                                              top: 0,
                                              left: 0,
                                              child: Container(
                                                constraints:
                                                    const BoxConstraints.expand(
                                                        width: 30, height: 15),
                                                alignment: Alignment.center,
                                                decoration: BoxDecoration(
                                                  color: ColorsUtils
                                                      .parseColorFromHexString(
                                                          ColorsUtils
                                                              .colorFf64),
                                                  borderRadius:
                                                      const BorderRadius.only(
                                                    topLeft: Radius.circular(5),
                                                    bottomRight:
                                                        Radius.circular(5),
                                                  ),
                                                ),
                                                child: Text(
                                                  '招牌',
                                                  style: StylesUtils
                                                      .customTextStyle(
                                                          fontSize: StylesUtils
                                                              .fontSize12),
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                        Expanded(
                                          child: Padding(
                                            padding:
                                                const EdgeInsets.only(left: 10),
                                            child: Column(
                                              children: [
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '香辣鸡排汉堡包',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color0000,
                                                            fontWeight:
                                                                FontWeight.w700,
                                                            fontSize: StylesUtils
                                                                .fontSize15),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  child: Text(
                                                    '主料：鸡胸肉',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '月售 53',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  child: Container(
                                                    alignment: Alignment.center,
                                                    constraints:
                                                        const BoxConstraints
                                                            .expand(
                                                            width: 34,
                                                            height: 16),
                                                    decoration: BoxDecoration(
                                                      border: Border.all(
                                                        color: ColorsUtils
                                                            .parseColorFromHexString(
                                                                ColorsUtils
                                                                    .colorFf64),
                                                      ),
                                                      borderRadius:
                                                          BorderRadius.circular(
                                                              3),
                                                    ),
                                                    child: Text(
                                                      '8.3折',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .colorFf64,
                                                              fontSize: StylesUtils
                                                                  .fontSize12),
                                                    ),
                                                  ),
                                                ),
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '30',
                                                    style: StylesUtils.customTextStyle(
                                                        color: ColorsUtils
                                                            .color9999,
                                                        fontSize: StylesUtils
                                                            .fontSize12,
                                                        decoration:
                                                            TextDecoration
                                                                .lineThrough,
                                                        decorationThickness: 1,
                                                        decorationStyle:
                                                            TextDecorationStyle
                                                                .solid,
                                                        decorationColor: ColorsUtils
                                                            .parseColorFromHexString(
                                                                ColorsUtils
                                                                    .color9999)),
                                                  ),
                                                ),
                                                Padding(
                                                  padding:
                                                      const EdgeInsets.only(
                                                          top: 5, right: 15),
                                                  child: Row(
                                                    mainAxisAlignment:
                                                        MainAxisAlignment
                                                            .spaceBetween,
                                                    children: [
                                                      Text(
                                                        '￥25',
                                                        style: StylesUtils
                                                            .customTextStyle(
                                                                color: ColorsUtils
                                                                    .colorFf64,
                                                                fontSize:
                                                                    StylesUtils
                                                                        .fontSize15,
                                                                fontWeight:
                                                                    FontWeight
                                                                        .w700),
                                                      ),
                                                      Wrap(
                                                        spacing: 15,
                                                        alignment:
                                                            WrapAlignment.end,
                                                        crossAxisAlignment:
                                                            WrapCrossAlignment
                                                                .center,
                                                        children: [
                                                          GestureDetector(
                                                            onTap: () {},
                                                            child: Icon(
                                                              CupertinoIcons
                                                                  .minus_circle_fill,
                                                              size: 25,
                                                              color: ColorsUtils
                                                                  .parseColorFromHexString(
                                                                      ColorsUtils
                                                                          .colorFe46),
                                                            ),
                                                          ),
                                                          Text(
                                                            '1',
                                                            style: StylesUtils.customTextStyle(
                                                                color: ColorsUtils
                                                                    .color0000,
                                                                fontSize:
                                                                    StylesUtils
                                                                        .fontSize15),
                                                          ),
                                                          GestureDetector(
                                                            onTap: () {},
                                                            child: Icon(
                                                              CupertinoIcons
                                                                  .plus_circle_fill,
                                                              size: 25,
                                                              color: ColorsUtils
                                                                  .parseColorFromHexString(
                                                                      ColorsUtils
                                                                          .colorFe46),
                                                            ),
                                                          ),
                                                        ],
                                                      ),
                                                    ],
                                                  ),
                                                ),
                                              ],
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(bottom: 10),
                                    child: Row(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      mainAxisAlignment:
                                          MainAxisAlignment.start,
                                      children: [
                                        Container(
                                          constraints:
                                              const BoxConstraints.expand(
                                                  width: 100, height: 100),
                                          decoration: BoxDecoration(
                                              borderRadius:
                                                  BorderRadius.circular(5),
                                              image: const DecorationImage(
                                                image: NetworkImage(
                                                  'https://img2.baidu.com/it/u=2788032657,525187033&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=559',
                                                ),
                                                fit: BoxFit.fill,
                                              )),
                                        ),
                                        Expanded(
                                          child: Padding(
                                            padding:
                                                const EdgeInsets.only(left: 10),
                                            child: Column(
                                              children: [
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '可口可乐',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color0000,
                                                            fontWeight:
                                                                FontWeight.w700,
                                                            fontSize: StylesUtils
                                                                .fontSize15),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  padding:
                                                      const EdgeInsets.only(
                                                          right: 15),
                                                  child: Text(
                                                    '碳酸汽水保存时间为7分钟，收到后请尽快饮用',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '月售 90',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  child: Container(
                                                    alignment: Alignment.center,
                                                    constraints:
                                                        const BoxConstraints
                                                            .expand(
                                                            width: 50,
                                                            height: 16),
                                                    decoration: BoxDecoration(
                                                      border: Border.all(
                                                        color: ColorsUtils.rgba(
                                                            228, 228, 228, 1),
                                                      ),
                                                      borderRadius:
                                                          BorderRadius.circular(
                                                              2),
                                                    ),
                                                    child: Text(
                                                      '单点不送',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color9999,
                                                              fontSize: StylesUtils
                                                                  .fontSize10),
                                                    ),
                                                  ),
                                                ),
                                                Padding(
                                                  padding:
                                                      const EdgeInsets.only(
                                                          right: 15),
                                                  child: Row(
                                                    mainAxisAlignment:
                                                        MainAxisAlignment
                                                            .spaceBetween,
                                                    children: [
                                                      Text.rich(
                                                        TextSpan(
                                                          children: [
                                                            TextSpan(
                                                              text: '￥5',
                                                              style: StylesUtils.customTextStyle(
                                                                  color: ColorsUtils
                                                                      .colorFf64,
                                                                  fontSize:
                                                                      StylesUtils
                                                                          .fontSize15,
                                                                  fontWeight:
                                                                      FontWeight
                                                                          .w700),
                                                            ),
                                                            TextSpan(
                                                              text: ' 起',
                                                              style: StylesUtils
                                                                  .customTextStyle(
                                                                color: ColorsUtils
                                                                    .colorFf64,
                                                                fontSize:
                                                                    StylesUtils
                                                                        .fontSize12,
                                                              ),
                                                            ),
                                                          ],
                                                        ),
                                                      ),
                                                      Container(
                                                        constraints:
                                                            const BoxConstraints
                                                                .expand(
                                                                width: 60,
                                                                height: 25),
                                                        alignment:
                                                            Alignment.center,
                                                        decoration:
                                                            BoxDecoration(
                                                          borderRadius:
                                                              BorderRadius
                                                                  .circular(13),
                                                          gradient:
                                                              LinearGradient(
                                                            colors: [
                                                              //linear-gradient(90deg, rgba(255, 153, 0, 1) 0%, rgba(255, 153, 0, 1) 0%, rgba(254, 70, 1, 1) 100%, rgba(254, 70, 1, 1) 100%)
                                                              ColorsUtils.rgba(
                                                                  255,
                                                                  153,
                                                                  0,
                                                                  1),
                                                              ColorsUtils.rgba(
                                                                  255,
                                                                  153,
                                                                  0,
                                                                  1),
                                                              ColorsUtils.rgba(
                                                                  254,
                                                                  70,
                                                                  1,
                                                                  1),
                                                              ColorsUtils.rgba(
                                                                  254,
                                                                  70,
                                                                  1,
                                                                  1),
                                                            ],
                                                            stops: const [
                                                              0,
                                                              0,
                                                              1,
                                                              1
                                                            ],
                                                            begin: Alignment
                                                                .centerLeft,
                                                            end: Alignment
                                                                .centerRight,
                                                            tileMode:
                                                                TileMode.mirror,
                                                            transform:
                                                                GradientRotation(
                                                              RadianUtils
                                                                  .angleToRadian(
                                                                      90),
                                                            ),
                                                          ),
                                                        ),
                                                        child: Text(
                                                          '选规格',
                                                          style: StylesUtils
                                                              .customTextStyle(
                                                                  fontSize:
                                                                      StylesUtils
                                                                          .fontSize13),
                                                        ),
                                                      )
                                                    ],
                                                  ),
                                                ),
                                              ],
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(bottom: 10),
                                    child: Row(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      mainAxisAlignment:
                                          MainAxisAlignment.start,
                                      children: [
                                        Container(
                                          constraints:
                                              const BoxConstraints.expand(
                                                  width: 100, height: 100),
                                          decoration: BoxDecoration(
                                            borderRadius:
                                                BorderRadius.circular(5),
                                            image: const DecorationImage(
                                              image: NetworkImage(
                                                'https://img2.baidu.com/it/u=3350601868,2953953690&fm=253&fmt=auto&app=138&f=JPEG?w=310&h=310',
                                              ),
                                              fit: BoxFit.fill,
                                            ),
                                          ),
                                        ),
                                        Expanded(
                                          child: Padding(
                                            padding:
                                                const EdgeInsets.only(left: 10),
                                            child: Column(
                                              children: [
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '香辣鸡翅',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color0000,
                                                            fontWeight:
                                                                FontWeight.w700,
                                                            fontSize: StylesUtils
                                                                .fontSize15),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  child: Text(
                                                    '主料：鸡翅',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Align(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Text(
                                                    '月售 60',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Padding(
                                                  padding:
                                                      const EdgeInsets.only(
                                                          right: 15, top: 20),
                                                  child: Row(
                                                    mainAxisAlignment:
                                                        MainAxisAlignment
                                                            .spaceBetween,
                                                    children: [
                                                      Text.rich(
                                                        TextSpan(
                                                          children: [
                                                            TextSpan(
                                                              text: '￥18',
                                                              style: StylesUtils.customTextStyle(
                                                                  color: ColorsUtils
                                                                      .colorFf64,
                                                                  fontSize:
                                                                      StylesUtils
                                                                          .fontSize15,
                                                                  fontWeight:
                                                                      FontWeight
                                                                          .w700),
                                                            ),
                                                          ],
                                                        ),
                                                      ),
                                                      GestureDetector(
                                                        onTap: () {},
                                                        child: Icon(
                                                          CupertinoIcons
                                                              .plus_circle_fill,
                                                          size: 25,
                                                          color: ColorsUtils
                                                              .parseColorFromHexString(
                                                                  ColorsUtils
                                                                      .colorFe46),
                                                        ),
                                                      ),
                                                    ],
                                                  ),
                                                ),
                                              ],
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  Container(
                                    height: 50,
                                    alignment: Alignment.centerLeft,
                                    child: Text(
                                      '汉堡套餐',
                                      style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color0000,
                                      ),
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(bottom: 10),
                                    child: Row(
                                      crossAxisAlignment:
                                          CrossAxisAlignment.start,
                                      mainAxisAlignment:
                                          MainAxisAlignment.start,
                                      children: [
                                        Stack(
                                          children: [
                                            Container(
                                              constraints:
                                                  const BoxConstraints.expand(
                                                      width: 100, height: 100),
                                              decoration: BoxDecoration(
                                                borderRadius:
                                                    BorderRadius.circular(5),
                                                image: const DecorationImage(
                                                  image: NetworkImage(
                                                    'https://img0.baidu.com/it/u=2807318534,3734623072&fm=253&fmt=auto&app=120&f=JPEG?w=973&h=644',
                                                  ),
                                                  fit: BoxFit.fill,
                                                ),
                                              ),
                                            ),
                                            Positioned(
                                              top: 0,
                                              left: 0,
                                              child: Container(
                                                constraints:
                                                    const BoxConstraints.expand(
                                                        width: 30, height: 15),
                                                alignment: Alignment.center,
                                                decoration: BoxDecoration(
                                                  color: ColorsUtils.rgba(
                                                      99, 181, 75, 1),
                                                  borderRadius:
                                                      const BorderRadius.only(
                                                    topLeft: Radius.circular(5),
                                                    bottomRight:
                                                        Radius.circular(5),
                                                  ),
                                                ),
                                                child: Text(
                                                  '新品',
                                                  style: StylesUtils
                                                      .customTextStyle(
                                                          fontSize: StylesUtils
                                                              .fontSize12),
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                        Expanded(
                                          child: Padding(
                                            padding:
                                                const EdgeInsets.only(left: 10),
                                            child: Column(
                                              children: [
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  padding:
                                                      const EdgeInsets.only(
                                                          right: 15),
                                                  child: Text(
                                                    '招牌香辣鸡排堡单人套餐',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color0000,
                                                            fontWeight:
                                                                FontWeight.w700,
                                                            fontSize: StylesUtils
                                                                .fontSize15),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  child: Text(
                                                    '月售 9',
                                                    style: StylesUtils
                                                        .customTextStyle(
                                                            color: ColorsUtils
                                                                .color9999,
                                                            fontSize: StylesUtils
                                                                .fontSize12),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  child: Container(
                                                    alignment: Alignment.center,
                                                    constraints:
                                                        const BoxConstraints
                                                            .expand(
                                                            width: 34,
                                                            height: 16),
                                                    decoration: BoxDecoration(
                                                      border: Border.all(
                                                        color: ColorsUtils
                                                            .parseColorFromHexString(
                                                                ColorsUtils
                                                                    .colorFf64),
                                                      ),
                                                      borderRadius:
                                                          BorderRadius.circular(
                                                              3),
                                                    ),
                                                    child: Text(
                                                      '8.6折',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .colorFf64,
                                                              fontSize: StylesUtils
                                                                  .fontSize12),
                                                    ),
                                                  ),
                                                ),
                                                Container(
                                                  alignment:
                                                      Alignment.centerLeft,
                                                  margin: const EdgeInsets
                                                      .symmetric(vertical: 8),
                                                  child: Text(
                                                    '40',
                                                    style: StylesUtils.customTextStyle(
                                                        color: ColorsUtils
                                                            .color9999,
                                                        fontSize: StylesUtils
                                                            .fontSize12,
                                                        decoration:
                                                            TextDecoration
                                                                .lineThrough,
                                                        decorationThickness: 1,
                                                        decorationStyle:
                                                            TextDecorationStyle
                                                                .solid,
                                                        decorationColor: ColorsUtils
                                                            .parseColorFromHexString(
                                                                ColorsUtils
                                                                    .color9999)),
                                                  ),
                                                ),
                                                Padding(
                                                  padding:
                                                      const EdgeInsets.only(
                                                          top: 0, right: 15),
                                                  child: Row(
                                                    mainAxisAlignment:
                                                        MainAxisAlignment
                                                            .spaceBetween,
                                                    children: [
                                                      Text(
                                                        '￥35',
                                                        style: StylesUtils
                                                            .customTextStyle(
                                                                color: ColorsUtils
                                                                    .colorFf64,
                                                                fontSize:
                                                                    StylesUtils
                                                                        .fontSize15,
                                                                fontWeight:
                                                                    FontWeight
                                                                        .w700),
                                                      ),
                                                      Container(
                                                        constraints:
                                                            const BoxConstraints
                                                                .expand(
                                                                width: 60,
                                                                height: 25),
                                                        alignment:
                                                            Alignment.center,
                                                        decoration:
                                                            BoxDecoration(
                                                          borderRadius:
                                                              BorderRadius
                                                                  .circular(13),
                                                          gradient:
                                                              LinearGradient(
                                                            colors: [
                                                              //linear-gradient(90deg, rgba(255, 153, 0, 1) 0%, rgba(255, 153, 0, 1) 0%, rgba(254, 70, 1, 1) 100%, rgba(254, 70, 1, 1) 100%)
                                                              ColorsUtils.rgba(
                                                                  255,
                                                                  153,
                                                                  0,
                                                                  1),
                                                              ColorsUtils.rgba(
                                                                  255,
                                                                  153,
                                                                  0,
                                                                  1),
                                                              ColorsUtils.rgba(
                                                                  254,
                                                                  70,
                                                                  1,
                                                                  1),
                                                              ColorsUtils.rgba(
                                                                  254,
                                                                  70,
                                                                  1,
                                                                  1),
                                                            ],
                                                            stops: const [
                                                              0,
                                                              0,
                                                              1,
                                                              1
                                                            ],
                                                            begin: Alignment
                                                                .centerLeft,
                                                            end: Alignment
                                                                .centerRight,
                                                            tileMode:
                                                                TileMode.mirror,
                                                            transform:
                                                                GradientRotation(
                                                              RadianUtils
                                                                  .angleToRadian(
                                                                      90),
                                                            ),
                                                          ),
                                                        ),
                                                        child: Text(
                                                          '选规格',
                                                          style: StylesUtils
                                                              .customTextStyle(
                                                                  fontSize:
                                                                      StylesUtils
                                                                          .fontSize13),
                                                        ),
                                                      ),
                                                    ],
                                                  ),
                                                ),
                                              ],
                                            ),
                                          ),
                                        ),
                                      ],
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(bottom: 10),
                                    child: Opacity(
                                      opacity: 0.5,
                                      child: Row(
                                        crossAxisAlignment:
                                            CrossAxisAlignment.start,
                                        mainAxisAlignment:
                                            MainAxisAlignment.start,
                                        children: [
                                          Container(
                                            constraints:
                                                const BoxConstraints.expand(
                                                    width: 100, height: 100),
                                            decoration: BoxDecoration(
                                              borderRadius:
                                                  BorderRadius.circular(5),
                                              image: const DecorationImage(
                                                image: NetworkImage(
                                                  'https://img2.baidu.com/it/u=2908821285,3101637649&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500',
                                                ),
                                                fit: BoxFit.fill,
                                              ),
                                            ),
                                          ),
                                          Expanded(
                                            child: Padding(
                                              padding: const EdgeInsets.only(
                                                  left: 10),
                                              child: Column(
                                                children: [
                                                  Container(
                                                    alignment:
                                                        Alignment.centerLeft,
                                                    child: Text(
                                                      '豪华单人套餐A',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color0000,
                                                              fontWeight:
                                                                  FontWeight
                                                                      .w700,
                                                              fontSize: StylesUtils
                                                                  .fontSize15),
                                                    ),
                                                  ),
                                                  Container(
                                                    alignment:
                                                        Alignment.centerLeft,
                                                    margin: const EdgeInsets
                                                        .symmetric(vertical: 8),
                                                    padding:
                                                        const EdgeInsets.only(
                                                            right: 15),
                                                    child: Text(
                                                      '香辣鸡排堡+辣味鸡肉卷+中杯可乐',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color9999,
                                                              fontSize: StylesUtils
                                                                  .fontSize12),
                                                    ),
                                                  ),
                                                  Align(
                                                    alignment:
                                                        Alignment.centerLeft,
                                                    child: Text(
                                                      '月售 10',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color9999,
                                                              fontSize: StylesUtils
                                                                  .fontSize12),
                                                    ),
                                                  ),
                                                  Padding(
                                                    padding:
                                                        const EdgeInsets.only(
                                                            top: 8, right: 15),
                                                    child: Row(
                                                      mainAxisAlignment:
                                                          MainAxisAlignment
                                                              .spaceBetween,
                                                      children: [
                                                        Text(
                                                          '￥28',
                                                          style: StylesUtils
                                                              .customTextStyle(
                                                                  color: ColorsUtils
                                                                      .colorFf64,
                                                                  fontSize:
                                                                      StylesUtils
                                                                          .fontSize15,
                                                                  fontWeight:
                                                                      FontWeight
                                                                          .w700),
                                                        ),
                                                        Container(
                                                          constraints:
                                                              const BoxConstraints
                                                                  .expand(
                                                                  width: 60,
                                                                  height: 25),
                                                          alignment:
                                                              Alignment.center,
                                                          decoration: BoxDecoration(
                                                              borderRadius:
                                                                  BorderRadius
                                                                      .circular(
                                                                          13),
                                                              color: ColorsUtils
                                                                  .parseColorFromHexString(
                                                                      ColorsUtils
                                                                          .colorCccc)),
                                                          child: Text(
                                                            '未开售',
                                                            style: StylesUtils
                                                                .customTextStyle(
                                                                    fontSize:
                                                                        StylesUtils
                                                                            .fontSize13),
                                                          ),
                                                        ),
                                                      ],
                                                    ),
                                                  ),
                                                ],
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                  Padding(
                                    padding: const EdgeInsets.only(bottom: 10),
                                    child: Opacity(
                                      opacity: 0.5,
                                      child: Row(
                                        crossAxisAlignment:
                                            CrossAxisAlignment.start,
                                        mainAxisAlignment:
                                            MainAxisAlignment.start,
                                        children: [
                                          Container(
                                            constraints:
                                                const BoxConstraints.expand(
                                                    width: 100, height: 100),
                                            decoration: BoxDecoration(
                                              borderRadius:
                                                  BorderRadius.circular(5),
                                              image: const DecorationImage(
                                                image: NetworkImage(
                                                  'https://img0.baidu.com/it/u=318904076,3694532869&fm=253&fmt=auto&app=138&f=JPEG?w=660&h=440',
                                                ),
                                                fit: BoxFit.fill,
                                              ),
                                            ),
                                          ),
                                          Expanded(
                                            child: Padding(
                                              padding: const EdgeInsets.only(
                                                  left: 10),
                                              child: Column(
                                                children: [
                                                  Container(
                                                    alignment:
                                                        Alignment.centerLeft,
                                                    child: Text(
                                                      '主食小吃奶茶套餐',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color0000,
                                                              fontWeight:
                                                                  FontWeight
                                                                      .w700,
                                                              fontSize: StylesUtils
                                                                  .fontSize15),
                                                    ),
                                                  ),
                                                  Container(
                                                    alignment:
                                                        Alignment.centerLeft,
                                                    margin: const EdgeInsets
                                                        .symmetric(vertical: 8),
                                                    padding:
                                                        const EdgeInsets.only(
                                                            right: 15),
                                                    child: Text(
                                                      '主料：其他',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color9999,
                                                              fontSize: StylesUtils
                                                                  .fontSize12),
                                                    ),
                                                  ),
                                                  Align(
                                                    alignment:
                                                        Alignment.centerLeft,
                                                    child: Text(
                                                      '月售 10',
                                                      style: StylesUtils
                                                          .customTextStyle(
                                                              color: ColorsUtils
                                                                  .color9999,
                                                              fontSize: StylesUtils
                                                                  .fontSize12),
                                                    ),
                                                  ),
                                                  Padding(
                                                    padding:
                                                        const EdgeInsets.only(
                                                            top: 8, right: 15),
                                                    child: Row(
                                                      mainAxisAlignment:
                                                          MainAxisAlignment
                                                              .spaceBetween,
                                                      children: [
                                                        Text(
                                                          '￥28',
                                                          style: StylesUtils
                                                              .customTextStyle(
                                                                  color: ColorsUtils
                                                                      .colorFf64,
                                                                  fontSize:
                                                                      StylesUtils
                                                                          .fontSize15,
                                                                  fontWeight:
                                                                      FontWeight
                                                                          .w700),
                                                        ),
                                                        Container(
                                                          constraints:
                                                              const BoxConstraints
                                                                  .expand(
                                                                  width: 60,
                                                                  height: 25),
                                                          alignment:
                                                              Alignment.center,
                                                          decoration:
                                                              BoxDecoration(
                                                            borderRadius:
                                                                BorderRadius
                                                                    .circular(
                                                                        13),
                                                            color: ColorsUtils
                                                                .parseColorFromHexString(
                                                                    ColorsUtils
                                                                        .colorCccc),
                                                          ),
                                                          child: Text(
                                                            '已售完',
                                                            style: StylesUtils
                                                                .customTextStyle(
                                                                    fontSize:
                                                                        StylesUtils
                                                                            .fontSize13),
                                                          ),
                                                        ),
                                                      ],
                                                    ),
                                                  ),
                                                ],
                                              ),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                  ),
                                  const SizedBox(
                                    height: 100,
                                  ),
                                ],
                              ),
                            ),
                          ),
                        ),
                      ),
                    ],
                  ),
                );
              }),
            ],
          ),
          CustomScrollView(
            slivers: [
              SliverToBoxAdapter(
                child: Container(
                  margin: const EdgeInsets.only(top: 10),
                  alignment: Alignment.center,
                  child: Container(
                    width: 345,
                    alignment: Alignment.centerLeft,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.symmetric(
                        vertical: 15, horizontal: 15),
                    child: Column(
                      children: [
                        Row(
                          children: [
                            Text(
                              '4.5',
                              style: StylesUtils.customTextStyle(
                                  fontSize: StylesUtils.fontSize28,
                                  fontWeight: FontWeight.w700,
                                  color: ColorsUtils.colorFf64),
                            ),
                            Padding(
                              padding: const EdgeInsets.only(left: 15),
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                mainAxisAlignment: MainAxisAlignment.start,
                                children: [
                                  Container(
                                    alignment: Alignment.topLeft,
                                    child: Text(
                                      '商家评分',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color9999,
                                          fontSize: StylesUtils.fontSize12),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 15),
                                    alignment: Alignment.centerLeft,
                                    child: Wrap(
                                      spacing: 5,
                                      alignment: WrapAlignment.start,
                                      crossAxisAlignment:
                                          WrapCrossAlignment.center,
                                      children: [
                                        for (var i = 0; i < 4; i++)
                                          Icon(
                                            CupertinoIcons.star_fill,
                                            size: 14,
                                            color: ColorsUtils
                                                .parseColorFromHexString(
                                                    ColorsUtils.colorFf64),
                                          ),
                                        Icon(
                                          CupertinoIcons.star_fill,
                                          size: 14,
                                          color: ColorsUtils
                                              .parseColorFromHexString(
                                                  ColorsUtils.colorCccc),
                                        ),
                                      ],
                                    ),
                                  ),
                                ],
                              ),
                            ),
                            Expanded(
                              child: Padding(
                                padding: const EdgeInsets.only(left: 15),
                                child: Column(
                                  children: [
                                    Align(
                                      alignment: Alignment.centerLeft,
                                      child: Wrap(
                                        spacing: 15,
                                        alignment: WrapAlignment.start,
                                        crossAxisAlignment:
                                            WrapCrossAlignment.center,
                                        children: [
                                          Text(
                                            '味道',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color9999,
                                                fontSize:
                                                    StylesUtils.fontSize12),
                                          ),
                                          Text(
                                            '包装',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color9999,
                                                fontSize:
                                                    StylesUtils.fontSize12),
                                          ),
                                          Text(
                                            '配送满意度',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color9999,
                                                fontSize:
                                                    StylesUtils.fontSize12),
                                          )
                                        ],
                                      ),
                                    ),
                                    Container(
                                      margin: const EdgeInsets.only(top: 15),
                                      alignment: Alignment.centerLeft,
                                      child: Wrap(
                                        spacing: 15,
                                        alignment: WrapAlignment.start,
                                        crossAxisAlignment:
                                            WrapCrossAlignment.center,
                                        children: [
                                          Text(
                                            '4.4',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color0000,
                                                fontSize:
                                                    StylesUtils.fontSize16,
                                                fontWeight: FontWeight.w700),
                                          ),
                                          Text(
                                            '4.7',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color0000,
                                                fontSize:
                                                    StylesUtils.fontSize16,
                                                fontWeight: FontWeight.w700),
                                          ),
                                          Text(
                                            '96%',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color0000,
                                                fontSize:
                                                    StylesUtils.fontSize16,
                                                fontWeight: FontWeight.w700),
                                          )
                                        ],
                                      ),
                                    ),
                                  ],
                                ),
                              ),
                            ),
                          ],
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 20),
                          alignment: Alignment.centerLeft,
                          child: Wrap(
                              spacing: 10,
                              runSpacing: 10,
                              children: controller.tags
                                  .asMap()
                                  .map(
                                    (key, value) => MapEntry(
                                      key,
                                      Builder(builder: (_) {
                                        final style =
                                            StylesUtils.customTextStyle(
                                                color: ColorsUtils.color0000,
                                                fontSize:
                                                    StylesUtils.fontSize13);
                                        double width =
                                            ToolsUtils.calculateTextWidth(
                                                value: value, style: style);
                                        return Obx(
                                          () => GestureDetector(
                                            onTap: () {
                                              controller.tagIndex.value = key;
                                            },
                                            child: Container(
                                              alignment: Alignment.center,
                                              height: 30,
                                              width: width + 20,
                                              decoration:
                                                  activeBoxDecoration(key),
                                              child: Text(
                                                value,
                                                style:
                                                    StylesUtils.customTextStyle(
                                                        fontSize: StylesUtils
                                                            .fontSize13,
                                                        color: key ==
                                                                controller
                                                                    .tagIndex
                                                                    .value
                                                            ? ColorsUtils
                                                                .colorFf64
                                                            : ColorsUtils
                                                                .color7979),
                                              ),
                                            ),
                                          ),
                                        );
                                      }),
                                    ),
                                  )
                                  .values
                                  .toList()),
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 15),
                          alignment: Alignment.centerLeft,
                          child: Wrap(
                            spacing: 5,
                            crossAxisAlignment: WrapCrossAlignment.center,
                            alignment: WrapAlignment.start,
                            children: [
                              Icon(
                                CupertinoIcons.checkmark_alt_circle_fill,
                                size: 18,
                                color: ColorsUtils.parseColorFromHexString(
                                    ColorsUtils.colorFf64),
                              ),
                              Text(
                                '只看有内容的评价',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color0000,
                                    fontSize: StylesUtils.fontSize13),
                              ),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
              SliverToBoxAdapter(
                child: Container(
                  margin: const EdgeInsets.only(top: 10),
                  alignment: Alignment.center,
                  child: Container(
                    width: 345,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.symmetric(
                        vertical: 15, horizontal: 15),
                    alignment: Alignment.centerLeft,
                    child: Column(
                      children: [
                        Row(
                          children: [
                            const CircleAvatar(
                              radius: 20,
                              backgroundImage: NetworkImage(
                                  'https://img2.baidu.com/it/u=4253234990,10305436&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=500'),
                            ),
                            Expanded(
                              child: Padding(
                                padding: const EdgeInsets.only(left: 15),
                                child: Column(
                                  children: [
                                    Align(
                                      alignment: Alignment.topLeft,
                                      child: Wrap(
                                        spacing: 10,
                                        crossAxisAlignment:
                                            WrapCrossAlignment.center,
                                        alignment: WrapAlignment.start,
                                        children: [
                                          Text(
                                            '贝***芬',
                                            style: StylesUtils.customTextStyle(
                                                color: ColorsUtils.color0000,
                                                fontWeight: FontWeight.w700),
                                          ),
                                          Container(
                                            alignment: Alignment.center,
                                            constraints:
                                                const BoxConstraints.expand(
                                                    width: 40, height: 20),
                                            decoration: BoxDecoration(
                                              borderRadius:
                                                  BorderRadius.circular(3),
                                              color: ColorsUtils
                                                  .parseColorFromHexString(
                                                      ColorsUtils.colorFf64),
                                            ),
                                            child: Text(
                                              '回头客',
                                              style:
                                                  StylesUtils.customTextStyle(
                                                      fontSize: StylesUtils
                                                          .fontSize12),
                                            ),
                                          ),
                                        ],
                                      ),
                                    ),
                                    Container(
                                      margin: const EdgeInsets.only(top: 8),
                                      alignment: Alignment.centerLeft,
                                      child: Text(
                                        '2024-07-05',
                                        style: StylesUtils.customTextStyle(
                                            fontSize: StylesUtils.fontSize12,
                                            color: ColorsUtils.color9999),
                                      ),
                                    ),
                                  ],
                                ),
                              ),
                            ),
                            Center(
                              child: Text.rich(
                                TextSpan(
                                  children: [
                                    TextSpan(
                                        text: '有用 10 ',
                                        style: StylesUtils.customTextStyle(
                                            color: ColorsUtils.color7979,
                                            fontSize: StylesUtils.fontSize12)),
                                    WidgetSpan(
                                        child: Icon(
                                          CupertinoIcons.hand_thumbsup,
                                          size: 15,
                                          color: ColorsUtils
                                              .parseColorFromHexString(
                                                  ColorsUtils.color7979),
                                        ),
                                        alignment: PlaceholderAlignment.middle)
                                  ],
                                ),
                              ),
                            ),
                          ],
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 10),
                          child: Wrap(
                            spacing: 5,
                            alignment: WrapAlignment.start,
                            crossAxisAlignment: WrapCrossAlignment.center,
                            children: [
                              for (var i = 0; i < 4; i++)
                                Icon(
                                  CupertinoIcons.star_fill,
                                  size: 14,
                                  color: ColorsUtils.parseColorFromHexString(
                                      ColorsUtils.colorFf64),
                                ),
                              Icon(
                                CupertinoIcons.star_fill,
                                size: 14,
                                color: ColorsUtils.parseColorFromHexString(
                                    ColorsUtils.colorCccc),
                              ),
                              Text(
                                '好',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979,
                                    fontSize: StylesUtils.fontSize13),
                              )
                            ],
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 20, bottom: 20),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '一如既往的不错，比较清淡，适合南方人口味，麦香鸡排汉堡值得推荐。',
                            style: StylesUtils.customTextStyle(
                                fontSize: StylesUtils.fontSize15,
                                color: ColorsUtils.color0000,
                                lineHeight: 1.4),
                          ),
                        ),
                        Row(
                          children: [
                            Container(
                              constraints: const BoxConstraints.expand(
                                  width: 208, height: 208),
                              decoration: BoxDecoration(
                                  color: ColorsUtils.rgb(245, 245, 245),
                                  image: const DecorationImage(
                                      fit: BoxFit.fill,
                                      image: NetworkImage(
                                          'https://img2.baidu.com/it/u=3138698661,3814509273&fm=253&fmt=auto&app=120&f=JPEG?w=640&h=427'))),
                            ),
                            Expanded(
                              child: Padding(
                                padding: const EdgeInsets.only(left: 10),
                                child: Column(
                                  children: [
                                    Container(
                                      height: 101,
                                      margin: const EdgeInsets.only(bottom: 3),
                                      decoration: BoxDecoration(
                                          color: ColorsUtils.rgb(245, 245, 245),
                                          image: const DecorationImage(
                                              fit: BoxFit.fill,
                                              image: NetworkImage(
                                                  'https://img0.baidu.com/it/u=1991857231,3387535707&fm=253&fmt=auto&app=138&f=JPEG?w=430&h=322'))),
                                    ),
                                    Container(
                                      height: 101,
                                      margin: const EdgeInsets.only(top: 3),
                                      decoration: BoxDecoration(
                                          color: ColorsUtils.rgb(245, 245, 245),
                                          image: const DecorationImage(
                                              fit: BoxFit.fill,
                                              image: NetworkImage(
                                                  'https://img1.baidu.com/it/u=4016350624,210853072&fm=253&fmt=auto&app=138&f=JPEG?w=525&h=350'))),
                                    ),
                                  ],
                                ),
                              ),
                            )
                          ],
                        ),
                        Container(
                          margin: const EdgeInsets.symmetric(vertical: 20),
                          alignment: Alignment.center,
                          child: Container(
                            width: 315,
                            padding: const EdgeInsets.all(10),
                            decoration: BoxDecoration(
                                color: ColorsUtils.rgba(249, 249, 249, 1),
                                borderRadius: BorderRadius.circular(5)),
                            child: Column(
                              children: [
                                Align(
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    '商家回复 (当天)',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize13),
                                  ),
                                ),
                                Container(
                                  margin: const EdgeInsets.only(top: 10),
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    '亲爱的顾客，感谢您对我们店铺的支持和喜爱，真的很抱歉没有让您100%满意。',
                                    style: StylesUtils.customTextStyle(
                                        lineHeight: 1.5,
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize13),
                                  ),
                                )
                              ],
                            ),
                          ),
                        ),
                        Center(
                          child: Container(
                            padding: const EdgeInsets.only(
                              left: 15,
                            ),
                            constraints: const BoxConstraints.expand(
                                width: 300, height: 30),
                            decoration: BoxDecoration(
                                color: ColorsUtils.rgba(250, 245, 245, 1),
                                borderRadius: BorderRadius.circular(3)),
                            alignment: Alignment.centerLeft,
                            child: Text.rich(TextSpan(children: [
                              TextSpan(
                                  text: 'TA的推荐  ',
                                  style: StylesUtils.customTextStyle(
                                      fontWeight: FontWeight.w700,
                                      fontSize: StylesUtils.fontSize13,
                                      color: ColorsUtils.color0000)),
                              TextSpan(
                                  text: '特价华莱士单人餐A、可口可乐  ',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.colorFf64,
                                      fontSize: StylesUtils.fontSize13)),
                              TextSpan(
                                  text: '|  ',
                                  style: StylesUtils.customTextStyle(
                                      fontSize: StylesUtils.fontSize13,
                                      color: ColorsUtils.colorF9dc)),
                              WidgetSpan(
                                  child: Icon(
                                    CupertinoIcons.cart_fill,
                                    size: 15,
                                    color: ColorsUtils.parseColorFromHexString(
                                        ColorsUtils.colorFf64),
                                  ),
                                  alignment: PlaceholderAlignment.middle)
                            ])),
                          ),
                        )
                      ],
                    ),
                  ),
                ),
              ),
              SliverToBoxAdapter(
                child: Container(
                  margin: const EdgeInsets.only(top: 10),
                  alignment: Alignment.center,
                  child: Container(
                    width: 345,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.symmetric(
                        vertical: 15, horizontal: 15),
                    alignment: Alignment.centerLeft,
                    child: Column(
                      children: [
                        Row(
                          children: [
                            const CircleAvatar(
                              radius: 20,
                              backgroundImage: NetworkImage(
                                  'https://img1.baidu.com/it/u=1179395120,3994047188&fm=253&fmt=auto&app=138&f=JPEG?w=380&h=380'),
                            ),
                            Expanded(
                                child: Padding(
                              padding: const EdgeInsets.only(left: 15),
                              child: Column(
                                children: [
                                  Align(
                                    alignment: Alignment.topLeft,
                                    child: Text(
                                      '匿名用户',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color0000,
                                          fontWeight: FontWeight.w700),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 8),
                                    alignment: Alignment.centerLeft,
                                    child: Text(
                                      '2024-07-15',
                                      style: StylesUtils.customTextStyle(
                                          fontSize: StylesUtils.fontSize12,
                                          color: ColorsUtils.color9999),
                                    ),
                                  )
                                ],
                              ),
                            )),
                            Center(
                              child: Text.rich(TextSpan(children: [
                                TextSpan(
                                    text: '有用 10 ',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize12)),
                                WidgetSpan(
                                    child: Icon(
                                      CupertinoIcons.hand_thumbsup,
                                      size: 15,
                                      color:
                                          ColorsUtils.parseColorFromHexString(
                                              ColorsUtils.color7979),
                                    ),
                                    alignment: PlaceholderAlignment.middle)
                              ])),
                            )
                          ],
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 10),
                          child: Wrap(
                            spacing: 5,
                            alignment: WrapAlignment.start,
                            crossAxisAlignment: WrapCrossAlignment.center,
                            children: [
                              for (var i = 0; i < 4; i++)
                                Icon(
                                  CupertinoIcons.star_fill,
                                  size: 14,
                                  color: ColorsUtils.parseColorFromHexString(
                                      ColorsUtils.colorFf64),
                                ),
                              Icon(
                                CupertinoIcons.star_fill,
                                size: 14,
                                color: ColorsUtils.parseColorFromHexString(
                                    ColorsUtils.colorCccc),
                              ),
                              Text(
                                '好',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979,
                                    fontSize: StylesUtils.fontSize13),
                              )
                            ],
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 20, bottom: 20),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '一如既往的不错，比较清淡，适合南方人口味，麦香鸡排汉堡值得推荐。',
                            style: StylesUtils.customTextStyle(
                                fontSize: StylesUtils.fontSize15,
                                color: ColorsUtils.color0000,
                                lineHeight: 1.4),
                          ),
                        ),
                        Container(
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '好评',
                            style: StylesUtils.customTextStyle(
                                fontSize: StylesUtils.fontSize15,
                                color: ColorsUtils.color0000),
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.symmetric(vertical: 20),
                          alignment: Alignment.center,
                          child: Container(
                            width: 315,
                            padding: const EdgeInsets.all(10),
                            decoration: BoxDecoration(
                                color: ColorsUtils.rgba(249, 249, 249, 1),
                                borderRadius: BorderRadius.circular(5)),
                            child: Column(
                              children: [
                                Align(
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    '商家回复 (当天)',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize13),
                                  ),
                                ),
                                Container(
                                  margin: const EdgeInsets.only(top: 10),
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    '亲爱的顾客，感谢您对我们店铺的支持和喜爱，真的很抱歉没有让您100%满意。',
                                    style: StylesUtils.customTextStyle(
                                        lineHeight: 1.5,
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize13),
                                  ),
                                )
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
              SliverToBoxAdapter(
                child: Container(
                  margin: const EdgeInsets.only(top: 10),
                  alignment: Alignment.center,
                  child: Container(
                    width: 345,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.symmetric(
                        vertical: 15, horizontal: 15),
                    alignment: Alignment.centerLeft,
                    child: Column(
                      children: [
                        Row(
                          children: [
                            const CircleAvatar(
                              radius: 20,
                              backgroundImage: NetworkImage(
                                  'https://img0.baidu.com/it/u=2062656537,1277924993&fm=253&fmt=auto&app=120&f=JPEG?w=556&h=500'),
                            ),
                            Expanded(
                                child: Padding(
                              padding: const EdgeInsets.only(left: 15),
                              child: Column(
                                children: [
                                  Align(
                                    alignment: Alignment.topLeft,
                                    child: Text(
                                      '匿名用户',
                                      style: StylesUtils.customTextStyle(
                                          color: ColorsUtils.color0000,
                                          fontWeight: FontWeight.w700),
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 8),
                                    alignment: Alignment.centerLeft,
                                    child: Text(
                                      '2024-06-24',
                                      style: StylesUtils.customTextStyle(
                                          fontSize: StylesUtils.fontSize12,
                                          color: ColorsUtils.color9999),
                                    ),
                                  )
                                ],
                              ),
                            )),
                            Center(
                              child: Text.rich(TextSpan(children: [
                                TextSpan(
                                    text: '有用 10 ',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize12)),
                                WidgetSpan(
                                    child: Icon(
                                      CupertinoIcons.hand_thumbsup,
                                      size: 15,
                                      color:
                                          ColorsUtils.parseColorFromHexString(
                                              ColorsUtils.color7979),
                                    ),
                                    alignment: PlaceholderAlignment.middle)
                              ])),
                            )
                          ],
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 10),
                          child: Wrap(
                            spacing: 5,
                            alignment: WrapAlignment.start,
                            crossAxisAlignment: WrapCrossAlignment.center,
                            children: [
                              for (var i = 0; i < 4; i++)
                                Icon(
                                  CupertinoIcons.star_fill,
                                  size: 14,
                                  color: ColorsUtils.parseColorFromHexString(
                                      ColorsUtils.colorFf64),
                                ),
                              Icon(
                                CupertinoIcons.star_fill,
                                size: 14,
                                color: ColorsUtils.parseColorFromHexString(
                                    ColorsUtils.colorCccc),
                              ),
                              Text(
                                '好',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979,
                                    fontSize: StylesUtils.fontSize13),
                              )
                            ],
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 20, bottom: 20),
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '一如既往的不错，比较清淡，适合南方人口味，麦香鸡排汉堡值得推荐。',
                            style: StylesUtils.customTextStyle(
                                fontSize: StylesUtils.fontSize15,
                                color: ColorsUtils.color0000,
                                lineHeight: 1.4),
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.only(bottom: 20),
                          alignment: Alignment.centerLeft,
                          child: Text.rich(TextSpan(children: [
                            TextSpan(
                                text: '#香辣鸡翅',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.colorFf64,
                                    fontSize: StylesUtils.fontSize15)),
                            TextSpan(
                                text: '  烤过火了吧',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color0000,
                                    fontSize: StylesUtils.fontSize15))
                          ])),
                        ),
                        Align(
                          alignment: Alignment.centerLeft,
                          child: Container(
                            constraints: const BoxConstraints.expand(
                                width: 208, height: 208),
                            decoration: BoxDecoration(
                                color: ColorsUtils.rgb(245, 245, 245),
                                image: const DecorationImage(
                                    fit: BoxFit.fill,
                                    image: NetworkImage(
                                        'https://img1.baidu.com/it/u=3453570941,429487371&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500'))),
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.symmetric(vertical: 20),
                          alignment: Alignment.center,
                          child: Container(
                            width: 315,
                            padding: const EdgeInsets.all(10),
                            decoration: BoxDecoration(
                                color: ColorsUtils.rgba(249, 249, 249, 1),
                                borderRadius: BorderRadius.circular(5)),
                            child: Column(
                              children: [
                                Align(
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    '商家回复 (当天)',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize13),
                                  ),
                                ),
                                Container(
                                  margin: const EdgeInsets.only(top: 10),
                                  alignment: Alignment.centerLeft,
                                  child: Text(
                                    '亲爱的顾客，感谢您对我们店铺的支持和喜爱，真的很抱歉没有让您100%满意。',
                                    style: StylesUtils.customTextStyle(
                                        lineHeight: 1.5,
                                        color: ColorsUtils.color7979,
                                        fontSize: StylesUtils.fontSize13),
                                  ),
                                )
                              ],
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
              SliverToBoxAdapter(
                child: Container(
                  height: 50,
                  alignment: Alignment.center,
                  child: Text(
                    '已经到底了~',
                    style: StylesUtils.customTextStyle(
                        color: ColorsUtils.color9999),
                  ),
                ),
              )
            ],
          ),
          CustomScrollView(
            slivers: [
              SliverToBoxAdapter(
                child: Container(
                  alignment: Alignment.center,
                  margin: const EdgeInsets.only(top: 10),
                  child: Container(
                    constraints:
                        const BoxConstraints.expand(width: 345, height: 100),
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.symmetric(
                        vertical: 15, horizontal: 15),
                    child: Column(
                      children: [
                        Align(
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '华莱士·全鸡汉堡-凤凰广场2店',
                            style: StylesUtils.customTextStyle(
                                fontWeight: FontWeight.w700,
                                color: ColorsUtils.color0000),
                          ),
                        ),
                        Container(
                          margin: const EdgeInsets.only(top: 10),
                          alignment: Alignment.centerLeft,
                          child: Row(
                            children: [
                              Icon(
                                CupertinoIcons.placemark,
                                size: 20,
                                color: ColorsUtils.parseColorFromHexString(
                                    ColorsUtils.color9999),
                              ),
                              Expanded(
                                  child: Container(
                                padding: const EdgeInsets.only(left: 10),
                                alignment: Alignment.centerLeft,
                                child: Text(
                                  '北海市海城区新区大道凤凰广场A座一楼234号',
                                  style: StylesUtils.customTextStyle(
                                      color: ColorsUtils.color7979,
                                      lineHeight: 1.4),
                                ),
                              )),
                              Container(
                                width: 2,
                                height: 31,
                                margin:
                                    const EdgeInsets.symmetric(horizontal: 10),
                                color: ColorsUtils.parseColorFromHexString(
                                    ColorsUtils.colorF5f5),
                              ),
                              Center(
                                child: Icon(
                                  CupertinoIcons.phone,
                                  size: 25,
                                  color: ColorsUtils.parseColorFromHexString(
                                      ColorsUtils.colorFf64),
                                ),
                              )
                            ],
                          ),
                        )
                      ],
                    ),
                  ),
                ),
              ),
              SliverToBoxAdapter(
                child: Container(
                  alignment: Alignment.center,
                  margin: const EdgeInsets.only(top: 10),
                  child: Container(
                    width: 345,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.only(top: 5, left: 15, bottom: 5),
                    child: Column(
                      children: [
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '商家信息',
                            style: StylesUtils.customTextStyle(
                                color: ColorsUtils.color0000,
                                fontWeight: FontWeight.w700),
                          ),
                        ),
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '商家品类：汉堡薯条/炸鸡炸串',
                            style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color7979,
                            ),
                          ),
                        ),
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '堂食时段：11:30-13:30, 17:30-19:30',
                            style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color7979,
                            ),
                          ),
                        ),
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '外卖时段：10:00-23:59',
                            style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color7979,
                            ),
                          ),
                        ),
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text(
                            '自取时段：11:30-13:30, 17:30-19:30',
                            style: StylesUtils.customTextStyle(
                              color: ColorsUtils.color7979,
                            ),
                          ),
                        ),
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text.rich(TextSpan(children: [
                            TextSpan(
                                text: '配送服务：',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979)),
                            WidgetSpan(
                                child: Container(
                                  constraints: const BoxConstraints.expand(
                                      width: 53, height: 17),
                                  alignment: Alignment.center,
                                  decoration: BoxDecoration(
                                      color: ColorsUtils.rgba(250, 245, 245, 1),
                                      borderRadius: BorderRadius.circular(1)),
                                  child: Text(
                                    '平台专送',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.colorFf64,
                                        fontSize: StylesUtils.fontSize12),
                                  ),
                                ),
                                alignment: PlaceholderAlignment.middle)
                          ])),
                        ),
                        Container(
                          height: 40,
                          alignment: Alignment.centerLeft,
                          child: Text.rich(TextSpan(children: [
                            TextSpan(
                                text: '商家服务：',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979)),
                            WidgetSpan(
                                child: Container(
                                  constraints: const BoxConstraints.expand(
                                      width: 15, height: 15),
                                  alignment: Alignment.center,
                                  decoration: BoxDecoration(
                                      border: Border.all(
                                          color: ColorsUtils
                                              .parseColorFromHexString(
                                                  ColorsUtils.color3478)),
                                      borderRadius: BorderRadius.circular(3)),
                                  child: Text(
                                    '票',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color3478,
                                        fontSize: StylesUtils.fontSize11),
                                  ),
                                ),
                                alignment: PlaceholderAlignment.middle),
                            TextSpan(
                                text: ' 可开发票 ',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979)),
                            WidgetSpan(
                                child: Container(
                                  constraints: const BoxConstraints.expand(
                                      width: 15, height: 15),
                                  alignment: Alignment.center,
                                  decoration: BoxDecoration(
                                      border: Border.all(
                                          color: ColorsUtils
                                              .parseColorFromHexString(
                                                  ColorsUtils.color63b5)),
                                      borderRadius: BorderRadius.circular(3)),
                                  child: Text(
                                    '取',
                                    style: StylesUtils.customTextStyle(
                                        color: ColorsUtils.color63b5,
                                        fontSize: StylesUtils.fontSize11),
                                  ),
                                ),
                                alignment: PlaceholderAlignment.middle),
                            TextSpan(
                                text: ' 支持自取',
                                style: StylesUtils.customTextStyle(
                                    color: ColorsUtils.color7979)),
                          ])),
                        ),
                      ],
                    ),
                  ),
                ),
              ),
              SliverToBoxAdapter(
                child: Container(
                  alignment: Alignment.center,
                  margin: const EdgeInsets.only(top: 10),
                  child: Container(
                    width: 345,
                    height: 40,
                    decoration: BoxDecoration(
                        color: Colors.white,
                        borderRadius: BorderRadius.circular(10)),
                    padding: const EdgeInsets.only(top: 5, left: 15, bottom: 5),
                    alignment: Alignment.center,
                    child: Text(
                      '查看商家资质信息',
                      style: StylesUtils.customTextStyle(
                          color: ColorsUtils.color7979),
                    ),
                  ),
                ),
              )
            ],
          ),
        ],
      ),
    );
  }

  BoxDecoration activeBoxDecoration(int index) {
    if (controller.tagIndex.value == index) {
      return BoxDecoration(
          color: ColorsUtils.rgba(250, 245, 245, 1),
          borderRadius: BorderRadius.circular(2),
          border: Border.all(color: ColorsUtils.rgba(244, 195, 186, 1)));
    }
    return BoxDecoration(
        color: ColorsUtils.rgba(245, 245, 245, 1),
        borderRadius: BorderRadius.circular(2));
  }
}

// class _MyCustomPainter extends CustomPainter {
//   @override
//   void paint(Canvas canvas, Size size) {
//     Paint paint = Paint()
//       ..color = ColorsUtils.parseColorFromHexString(ColorsUtils.colorFf64)
//       ..style = PaintingStyle.fill;

//     // 绘制圆角
//     Rect rect = Offset.zero & size;
//     RRect rrect = RRect.fromRectAndRadius(rect, const Radius.circular(2));
//     canvas.drawRRect(rrect, paint);

//     // 画线
//     paint.color = Colors.white;
//     paint.style = PaintingStyle.stroke;
//     paint.strokeWidth = 1;
//     double width = size.width - 30;
//     Path path = Path();
//     double maxHeight = 2;
//     double step = 5;
//     double interval = 2;
//     path.moveTo(width, maxHeight);
//     while (maxHeight < size.height - 2) {
//       maxHeight += step;
//       path.lineTo(width, maxHeight);
//       maxHeight += interval;
//     }
//     canvas.drawPath(path, paint);
//   }

//   @override
//   bool shouldRepaint(covariant CustomPainter oldDelegate) {
//     return this != oldDelegate;
//   }
// }

class _CouponShapeBorder extends ShapeBorder {
  @override
  EdgeInsetsGeometry get dimensions => throw UnimplementedError();

  @override
  Path getInnerPath(Rect rect, {TextDirection? textDirection}) {
    throw UnimplementedError();
  }

  @override
  Path getOuterPath(Rect rect, {TextDirection? textDirection}) {
    Path path = Path();
    path.addRect(rect);
    _formHoldLeft(path, rect);
    _formHoldRight(path, rect);
    path.fillType = PathFillType.evenOdd;
    return path;
  }

  @override
  void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {
    Paint paint = Paint();
    paint.color = Colors.white;
    paint.style = PaintingStyle.stroke;
    paint.strokeWidth = 1;
    double width = 40;
    Path path = Path();
    double maxHeight = 2;
    double step = 5;
    double interval = 2;
    path.moveTo(width, maxHeight);
    while (maxHeight < rect.height - 2) {
      maxHeight += step;
      path.lineTo(width, maxHeight);
      maxHeight += interval;
    }
    canvas.drawPath(path, paint);
  }

  @override
  ShapeBorder scale(double t) {
    throw UnimplementedError();
  }

  void _formHoldLeft(Path path, Rect rect) {
    path.addArc(
        Rect.fromCenter(
          center: const Offset(40, 1),
          width: 2,
          height: 2,
        ),
        pi * 3 / 2,
        pi);
  }

  void _formHoldRight(Path path, Rect rect) {
    path.addArc(
        Rect.fromCenter(
          center: Offset(40, rect.height - 1),
          width: 2,
          height: 2,
        ),
        pi / 2,
        pi);
  }
}

class _CouponShapeBorder2 extends ShapeBorder {
  @override
  EdgeInsetsGeometry get dimensions => EdgeInsets.zero;

  @override
  Path getOuterPath(Rect rect, {TextDirection? textDirection}) {
    Path path = Path();
    path.addRect(rect);
    _formHoldLeft(path, rect);
    _formHoldRight(path, rect);
    path.fillType = PathFillType.evenOdd;
    // path.addRRect(RRect.fromRectAndRadius(rect, const Radius.circular(2)));
    return path;
  }

  @override
  void paint(Canvas canvas, Rect rect, {TextDirection? textDirection}) {
    Paint paint = Paint();
    paint.color = ColorsUtils.parseColorFromHexString(ColorsUtils.colorFf64);
    paint.style = PaintingStyle.stroke;
    paint.strokeWidth = 1;
    double width = 35;
    Path path = Path();
    double maxHeight = 2;
    double step = 5;
    double interval = 2;
    path.moveTo(width, maxHeight);
    while (maxHeight < rect.height - 2) {
      maxHeight += step;
      path.lineTo(width, maxHeight);
      maxHeight += interval;
    }
    canvas.drawPath(path, paint);
    Path path2 = Path();
    path2.addRect(rect);
    canvas.drawPath(path2, paint);
  }

  @override
  ShapeBorder scale(double t) {
    throw UnimplementedError();
  }

  void _formHoldLeft(Path path, Rect rect) {
    path.addArc(
        Rect.fromCenter(
          center: const Offset(35, 1),
          width: 2,
          height: 2,
        ),
        pi * 3 / 2,
        pi);
  }

  void _formHoldRight(Path path, Rect rect) {
    path.addArc(
        Rect.fromCenter(
          center: Offset(35, rect.height - 1),
          width: 2,
          height: 2,
        ),
        pi / 2,
        pi);
  }

  @override
  Path getInnerPath(Rect rect, {TextDirection? textDirection}) {
    throw UnimplementedError();
  }
}
